package version1_1;

/**
 * @program:IntelliJ IDEA
 * @Description:电脑类
 * @author:Mr.CheCheHuiBujianO
 * @data: 2022/7/12 15:16
 */
public class Computer extends User{

    private String[] computerName = new String[]{"小黄","小绿","小紫","小白"};

    @Override
    public String getName() {
        return this.name;
    }

    @Override
    public void setName() {
        int nameResult = (int) (Math.random()*10000%3);
        String computerName = this.computerName[nameResult];
        System.out.println("当前你在和"+computerName+"进行对战");
        this.name = computerName;
    }

    @Override
    public String getGesture() {
        return this.gesture;
    }

    @Override
    public void setGesture() {
        int randomGestureNumber = (int) (Math.random()*1000%2);
        this.gesture = this.GestureGroup[randomGestureNumber];
    }
}
